A median value is the value in a set where there are an equal number of values above and below. For example, in the set consisting of the values 1, 3, 4, 7, and 9, the value "4" is the median value since there is an equal number of values above (two values consisting of "7" and "9") as there are below (two values consisting of "1" and "3").
The median value is used in numerous statistical operations. It would therefore be desirable to have a median hardware circuit that can quickly an efficiently calculate the median value from a set of values. Furthermore, it would be desirable if this median hardware circuit used a minimal number of gates to minimize the hardware implementation cost.